<script setup>
//单独写 文件上传封装成组件  在添加商品和轮播图里面使用

const handleUpload = async () => {
  try {
    //实现轮播图的上传
  } catch (err) {

  } finally {

  }
};
</script>

<template>
  <div>
    <el-upload
        :auto-upload="false"
        :on-change="handleChange"
        :before-upload="handleBeforeUpload"
        :on-progress="handleProgress"
    >
      <el-button slot="trigger">请选中上传的文件</el-button>
      <!--上传文件按钮-->

      <!--     -->
    </el-upload>
    <el-button style="margin-left: 10px" type="primary"
               @click="handleUpload">
      上传文件
    </el-button>
  </div>
</template>

<style scoped>

</style>
